#include "BQqueue.hpp"
using namespace BlockQueueModule;
BQqueue<int> bq;
void *Consumer(void *args)
{
    while (true)
    {
        sleep(2);
        int q;
        bq.Cqueue(&q);
        std::cout << q << std::endl;
    }
}
void *Producer(void *args)
{
    int p = 0;
    while (true)
    {
        sleep(1);
        bq.Equeue(p);
        p++;
    }
}
int main()
{
    pthread_t consumer, producer;
    pthread_create(&consumer, nullptr, Consumer, 0);
    pthread_create(&producer, nullptr, Producer, 0);
    pthread_join(consumer, nullptr);
    pthread_join(producer, nullptr);
    return 0;
}